package com.easychat.entity;

import com.easychat.entity.constants.Constants;
import lombok.Data;
import org.springframework.validation.annotation.Validated;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Pattern;
import java.io.Serializable;

/**
 * @author 10 2024/10/5
 */
@Data
public class RegisterUser implements Serializable {
    @NotEmpty(message = "验证码key不能为空")
    @Pattern(regexp = Constants.REGEX_PASSWORD)
    private String checkCodeKey;
    @NotEmpty(message = "邮箱不能为空")
    @Email
    private String email;
    @NotEmpty(message = "密码不能为空")
    private String password;
    @NotEmpty(message = "昵称不能为空")
    private String nickName;
    @NotEmpty(message = "验证码不能为空")
    private String checkCode;
}
